<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>注册</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen   animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">BBS</h1>

            </div>
            <h3>用户注册</h3>
            <p>创建一个账户</p>
            <form id="form" class="m-t" role="form" action="./user/register">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="用户名" required="" name="username" >
                </div>
                <div class="form-group">
                    <input type="email" class="form-control" placeholder="Email" required="" name="email" >
                </div>
                <div class="form-group">
                    <input id="password" type="password" class="form-control" placeholder="密码" required="" name="password">
                </div>
                <div class="form-group">
                    <input id="confirmpassword" type="password" class="form-control" placeholder="确认密码" required="">
                </div>
                <div class="form-group">
                        <div class="checkbox i-checks"><label> <input type="checkbox"><i></i> 同意相关政策 </label></div>
                </div>
                <button id="submit" type="submit" class="btn btn-primary block full-width m-b">注册</button>

                <p class="text-muted text-center"><small>已经有账户?</small></p>
                <a class="btn btn-sm btn-white btn-block" href="login.html">登录</a>
            </form>
            <p class="m-t"> <small>Inspinia we app framework base on Bootstrap 3 &copy; 2017</small> </p>
        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- iCheck -->
    <script src="js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            
            $('#submit').click(function() {
            	if($('#password').val()!=$('#confirmpassword').val()) {
            		alert('两次输入密码不一致');
            		return;
            	}
            	$('#form').submit();
            });
        });
    </script>
</body>

</html>